package generic.impl;

import generic.Generator;

import java.util.Random;

/**
 * @package generic.impl
 * @Class BookGeneratorImpl
 * @Description TODO
 * @Author zhangxinhua
 * @Date 19-10-30 下午3:24
 */
public class BookGeneratorImpl implements Generator<String> {
    private String[] fruits = new String[]{"Apple", "Banana", "Pear"};

    @Override
    public String next() {
        Random rand = new Random();
        return fruits[rand.nextInt(3)];
    }
}
